﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>@ViewData["Title"] - IdentityServer</title>

    <partial name="_BootstrapStylesPartial" />
    <partial name="_AnimateCssStylesPartial" />
    <partial name="_SiteStylesPartial" />
    
    <style>
        .container-fluid {
            max-width: 95%;
        }
        .navbar-nav .nav-link {
            white-space: nowrap;
        }
    </style>

    @RenderSection("Styles", required: false)
</head>
<body>

    <div id="background" class="backgroundPic"></div>
    <div id="navBlur" class="animated slideInDown faster backgroundBeforePic"></div>
    <div id="containerBlur" class="animated bounceInDown backgroundBeforePic"></div>
    @*<div id="footerBlur" class="backgroundBeforePic"></div>*@

    <header>
        <nav class="navbar navbar-expand-md fixed-top navbar-light animated slideInDown faster navbar-background">
            <div class="container-fluid">
                <a asp-area="" asp-controller="Home" asp-action="Index" class="navbar-brand">IdentityServer</a>
                <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
                        aria-expanded="false" aria-label="Toggle navigation">
                    <span class="navbar-toggler-icon"></span>
                </button>
                <div id="navbarSupportedContent" class="navbar-collapse collapse flex-row-reverse">
                    <partial name="_LoginPartial" />
                    <ul class="nav navbar-nav flex-fill">
                        <li class="nav-item"><a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Index"><localize>Home</localize></a></li>
                        <li class="nav-item"><a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="About"><localize>About</localize></a></li>
                        <li class="nav-item"><a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="Contact"><localize>Contact</localize></a></li>
                        <li class="nav-item"><a class="nav-link text-dark" asp-area="Manage" asp-controller="Localization" asp-action="Index"><localize>Localization Manager</localize></a></li>
                        <li class="nav-item dropdown">
                            <a href="#" class="nav-link text-dark dropdown-toggle" data-toggle="dropdown">
                                <localize>Application Manager</localize>
                                <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="nav-item"><a class="nav-link text-dark" asp-area="Manage" asp-controller="Home" asp-action="Index"><localize>Manager Home</localize></a></li>
                                <li class="nav-item"><a class="nav-link text-dark" asp-area="Identity" asp-page="/Manage/Users/Index"><localize>User Manager</localize></a></li>
                                <li class="nav-item"><a class="nav-link text-dark" asp-area="Identity" asp-page="/Manage/Roles/Index"><localize>Role Manager</localize></a></li>
                            </ul>
                        </li>
                        <li class="nav-item dropdown">
                            <a href="#" class="nav-link text-dark dropdown-toggle" data-toggle="dropdown">
                                <localize>Demo</localize>
                                <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="nav-item"><a class="nav-link text-dark" asp-area="" asp-page="/RazorPageDemo"><localize>Razor page demo</localize></a></li>
                                <li class="nav-item"><a class="nav-link text-dark" asp-area="" asp-page="/SimpleRazorPage2" asp-page-handler="Demo"><localize>Simple razor page 2 demo</localize></a></li>
                                <li class="nav-item"><a class="nav-link text-dark" asp-area="" asp-page="/FluentValidationDemo/Index"><localize>FluentValidation demo</localize></a></li>
                                <div class="dropdown-divider"></div>
                                <li class="nav-item"><a class="nav-link text-dark" asp-area="" asp-controller="DomainDemo" asp-action="Index"><localize>Domain demo</localize></a></li>
                                <li class="nav-item"><a class="nav-link text-dark" asp-area="" asp-page="/TreeDomainDemo/Index"><localize>TreeDomain demo</localize></a></li>
                                <div class="dropdown-divider"></div>
                                <li class="nav-item"><a class="nav-link text-dark" asp-area="" asp-page="/OnlineCode/CSharp"><localize>Web C# Script Demo</localize></a></li>
                            </ul>
                        </li>
                        <li class="nav-item dropdown">
                            <a href="#" class="nav-link text-dark dropdown-toggle" data-toggle="dropdown">
                                <localize>SignalR</localize>
                                <b class="caret"></b>
                            </a>
                            <ul class="dropdown-menu">
                                <li class="nav-item"><a class="nav-link text-dark" asp-area="" asp-page="/SignalR/Chat/Index"><localize>Chat</localize></a></li>
                            </ul>
                        </li>
                        <li class="nav-item"><a class="nav-link text-dark" asp-area="" asp-controller="Home" asp-action="GetControllersAndActions"><localize>Get controllers and actions</localize></a></li>
                    </ul>
                </div>
            </div>
        </nav>
    </header>

    <div class="container-fluid body-content animated bounceInDown backgroundBeforePic">
        <partial name="_CookieConsentPartial" />
        <main role="main">
            @RenderBody()
        </main>
    </div>

    <footer class="border-top footer text-muted">
        <div class="container-fluid">
            &copy; 2018 - IdentityServer - <a asp-area="" asp-controller="Home" asp-action="Privacy">Privacy</a>
        </div>
    </footer>

    <partial name="_JQueryScriptsPartial" />
    <partial name="_BootstrapScriptsPartial" />
    <partial name="_BootstrapDropdownHoverScriptsPartial" />
    <partial name="_SiteScriptsPartial" />

    <script asp-add-nonce="true">
        $(document).ready(function () {
            bodyPaddingTop();
            navBlur();
            containerBlur();
            footerBlur();

            $(window).resize(function () {
                bodyPaddingTop();
                navBlur();
                containerBlur();
                footerBlur();
            });

            $('body > div.container-fluid.body-content').eq(0).resize(function () {
                containerBlur();
                footerBlur();
            });

            $('body > header > nav').eq(0).resize(function () {
                navBlur();
            });

            $('.navbar [data-toggle="dropdown"]').bootstrapDropdownHover();
        });

        function bodyPaddingTop() {
            $('body > div.container-fluid.body-content').eq(0).css('padding-top', $('nav').eq(0).outerHeight() + 15);
        }

        function navBlur() {
            var exp = $('body > header > nav').eq(0);
            var h = exp.css('aria-expanded') === 'true' ? exp.outerHeight() : 0;
            $('#navBlur').eq(0).width($('nav').eq(0).outerWidth()).height($('nav').eq(0).outerHeight() + h);
        }

        function containerBlur() {
            $('#containerBlur').eq(0)
                .css('top', $('nav').eq(0).outerHeight() + 'px')
                .css("margin-left",
                parseFloat($('body > div.container-fluid.body-content').eq(0).css('margin-left').substr(0,
                        $('body > div.container-fluid.body-content').eq(0).css('margin-left').length - 2)))
                .css("margin-right",
                parseFloat($('body > div.container-fluid.body-content').eq(0).css('margin-right').substr(0,
                        $('body > div.container-fluid.body-content').eq(0).css('margin-right').length - 2)))
                .width($('body > div.container-fluid.body-content').outerWidth())
                .height($('body > div.container-fluid.body-content').eq(0).height() + 15);
        }

        function footerBlur() {
            var $footer = $('footer');
            if ($('.body-content').outerHeight() + $footer.height() < $(window).height()) {
                $footer.css('position', 'absolute');
            } else {
                $footer.css('position', 'static');
            }
        }
    </script>

    @RenderSection("Scripts", required: false)
</body>
</html>
